package 设计模式.第1部分.第8章_工厂模式.v3;

public class SimpleFactory {
	public static LeiFeng CreateLeiFeng(String type) {
		LeiFeng res = null;
		switch (type) {
		case "学雷锋的大学生":
			res = new Undergraduate();
			break;
		case "社区志愿者":
			res = new Volunteer();
			break;
		}
		return res;
	}
}
